{eval include template($common_template_pluginid.':new/common/header');}

<div class="weui-cells_form" >
	<iframe style="display:none" name="myiframe" id="myiframe"></iframe>
	<form id="postform" name="postform" action="plugin.php?id=aljbd&act={$_GET['act']}" method="POST"  accept-charset="utf-8">
		<input type="hidden" name="formhash" value="{FORMHASH}">
		<input type="hidden" name="cid" value="{$_GET['nid']}">
		<input type="hidden" name="bid" value="{$bid}">
		<input type="hidden" name="aljbd_consume_token" value="{eval echo create_token('aljbd_consume_token');}">
		<input type="hidden" name="type" id="type" value="{$type}">
		<input type="hidden" name="subtype" id="subtype" value="{$subtype}">

		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">{lang aljbd:s283}</label></div>
			<div class="weui-cell__bd">
				{eval echo dhtmlspecialchars($bd['name']);}
			</div>
		</div>
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">{lang aljbd:s284}</label></div>
			<div class="weui-cell__bd">
				<input class="weui-input" type="text" name="name" value="$n['subject']" placeholder="{lang aljbd:addconsume_touch_1}" >
			</div>
		</div>
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">{lang aljbd:addconsume_touch_2}</label></div>
			<div class="weui-cell__bd">
				<input class="weui-input" type="text" value="{if $n['full']}{eval echo floatval($n['full'])}{/if}" name="full"  placeholder="{lang aljbd:addconsume_touch_3}">
			</div>
			<div class="weui-cell__ft">{$price_symbol}</div>
		</div>
		<div class="weui-cell">
			<div class="weui-cell__hd"><label class="weui-label">{lang aljbd:addconsume_touch_4}</label></div>
			<div class="weui-cell__bd">
				<input class="weui-input" type="text" value="{if $n['reduction']}{eval echo floatval($n['reduction'])}{/if}" name="reduction"  placeholder="{lang aljbd:addconsume_touch_5}">
			</div>
			<div class="weui-cell__ft">{$price_symbol}</div>
		</div>
		<div class="weui-cell weui-cell_access">
			<div class="weui-cell__hd"><label class="weui-label">{lang aljbd:s223}</label></div>
			<div class="weui-cell__bd">
				<input class="weui-input" type="text" id='type-picker' value="{$default_type}"  placeholder="{lang aljbd:s224}"/>
			</div>
			<div class="weui-cell__ft"></div>
		</div>

		<div class="weui-cell">
			<div class="weui-cell__hd"><label  class="weui-label">{lang aljbd:addconsume_7}</label></div>
			<div class="weui-cell__bd">
				<input class="weui-input time_Picker" name="end" type="text" placeholder="{lang aljbd:addconsume_8}" value="{if $n['end']}{eval echo gmdate('Y-m-d H:i',$n['end']+8*3600);}{/if}" readonly="">
			</div>
		</div>
		<div class="weui-cell">
			<div class="weui-cell__bd">
				<div class="weui-uploader">
					<div class="weui-uploader__hd">
						<p class="weui-uploader__title">{lang aljbd:addconsume_4}</p>
						<div class="weui-uploader__info">555*345</div>
					</div>
					<div class="weui-uploader__bd">
						<ul class="weui-uploader__files" id="uploaderFiles">
							{if $n['pic']}

							<li class="weui-uploader__file weui-uploader__file_status img_list" style="background-image:url('{$n['pic']}')">
								<div class="weui-uploader__file-content">
									<i class="weui-icon-cancel" onclick="delimg(this)"></i>
								</div>
							</li>
							<input name="pic[]" class="pic" type="hidden" value="{$n['pic']}">

							{/if}
						</ul>
						<div class="weui-uploader__input-box" >
							<input id="uploaderInput" class="weui-uploader__input" type="file"  onchange="lrz_mobile(this,1)">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="weui-cells weui-cells_form" style="margin-top: 0px">
			<div class="weui-cell">
				<div class="weui-cell__bd">
					<textarea class="weui-textarea" name="jieshao" placeholder="{lang aljbd:addconsume_touch_6}" rows="3">$n['jieshao']</textarea>
				</div>
			</div>
		</div>
		<div class="weui-cells weui-cells_form" style="margin-top: 0px">
			<div class="weui-cell">
				<div class="weui-cell__bd">
					<textarea class="weui-textarea" name="xianzhi" placeholder="{lang aljbd:addconsume_touch_7} " rows="3">$n['xianzhi']</textarea>
				</div>
			</div>
		</div>
		<div class="weui-cells weui-cells_form" style="margin-top: 0px">
			<div class="weui-cell">
				<div class="weui-cell__bd">
					<textarea class="weui-textarea" name="xianzhi" placeholder="{lang aljbd:addconsume_touch_8} " rows="3">{if $n['mianze']}$n['mianze']{else}{$config['mianze']}{/if}</textarea>
				</div>
			</div>
		</div>
		<div class="weui-btn-area">
			<button class="weui-btn weui-btn_primary" name="submit" type="submit" value="Y" onclick="$.showLoading();">{lang aljbd:sj_dianping_12}</button>
		</div>
	</form>
</div>
<script>
    $('#fare_desc').change(function() {
        if($("#fare_desc").val()=='999999'){
            $("#fare").show();
        }else{
            $("#fare").hide();
        }
    });
    +function($){
        $.rawtypeData = $typejson;
    }($);
</script>
<script src="{$common_path}/static/weui/js/type-picker.min.js" charset="utf-8"></script>
<script>
	<!--{if $subtype3}-->
    var tree_status = true;
	<!--{else}-->
    var tree_status = false;
	<!--{/if}-->
    $("#type-picker").cityPicker({
        title: "{lang aljbd:addconsume_touch_9}",
        showDistrict: tree_status,
        onChange: function (picker, values, displayValues) {
            console.log(values);
            $('#type').val(values[0]);
            $('#subtype').val(values[1]);
            if(values[1] == values[2]){
                $('#subtype3').val('');
            }else{
                $('#subtype3').val(values[2]);
            }
        }
    });
</script>
{eval include template($common_template_pluginid.':new/common/footer');}